package KASystem;

import java.io.Serializable;
import java.util.ArrayList;

/*
 * HETTA ER EIN KLASSI HJÁ KRISTJAN @author Kristjan
 */
class Conference implements Serializable {

    int price;
    String name;
    String description;
    ArrayList<Hotel> hotels;
    ArrayList<Participant> participants;
    ArrayList<Daytrip> daytrips;

    public Conference(String n, String d, int p) {
        name = n;
        description = d;
        price = p;
        hotels = new ArrayList<>();
        participants = new ArrayList<>();
        daytrips = new ArrayList<>();
    }

    public int getPrice() {
        return price;
    }

    public void addHotel(Hotel h) {
        if (!hotels.contains(h)) {
            hotels.add(h);
        }
    }

    public void addParticipant(Participant p) {
        if (!participants.contains(p)) {
            participants.add(p);
        }
    }

    public void addDaytrip(Daytrip d) {
        if (!daytrips.contains(d)) {
            daytrips.add(d);
        }
    }

    public ArrayList<Hotel> getHotels() {
        return hotels;
    }

    public ArrayList<Participant> getParticipants() {
        return participants;
    }

    public ArrayList<Daytrip> getDaytrips() {
        return daytrips;
    }

    public String toString() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public void setName(String n) {
        name = n;
    }

    public String getName() {
        return name;
    }

    public void setDescription(String d) {
        description = d;
    }

    public void setPrice(int p) {
        price = p;
    }

    public void removeConferences(int i) {
        daytrips.remove(i);

    }
}